<?php

namespace app\admin\validate;

use think\Validate;

class Currency extends Validate
{
    protected $rule = [
        'name' => 'require|max:50',
        'field' => 'require',
        'algorithm' => 'require|max:255',
        'is_del' => 'in:0,1',
        'create_time' => 'datetime',
        'creator' => 'integer',
        'update_time' => 'datetime',
        'updater' => 'integer',
        'id' => 'integer|gt:0'
    ];

    protected $scene = [
        'search' => ['name' => 'max:255'],
        'delete' => ['ids' => 'require|array|checkIds'],
        'show' => ['id' => 'require'],
        'save' => ['name','algorithm'],
        'create' => ['name','algorithm'],
        'resource' => ['field']
    ];

}
